<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">
	.page{
	 
	width:350px; 
	text-align: center;
	margin: auto;
	font-size: 15px;
	margin-top: 50px;
	 }
	.page a{
	 	margin: 5px;
	 	background-color:#9bcdff;
	 	color:white;
	 	padding: 5px;
	 	font-weight: bold;
	 }
	
	 tr:nth-child(2n){
	 	background-color: #eeffff;
	 }
	
	 tr td:nth-child(2){
	 	
	 	width:400px;
	 	text-align: center;
	 }
	 #intar{
	 	font-size:17px;
	 	width: 95%;
	 	margin-left: 15px;
	 	font-weight: none;
	 }
	 #intar td,th{
	 	text-align: center;
	 }
	 
</style>
</head>
<body>
	<div
		style="width: 1050px; height: 570px; background-color: #FFF; margin: 20px;">
		<h4
			style="background-color: #9FB2C2; padding-left: 10px; color: #516D8A; line-height: 40px;">
			<img alt="" src="${initParam.url}/statics/images/title.jpg">全部通知
		</h4>
		<div>
		<table class="table table-hover" id="intar">
			<tr>
				<th>状态</th>
				<th>内容</th>
				<th>发布日期</th>
				<th>操作</th>
			</tr>
			<c:forEach var="inlist" items="${lisTargets }">
			<tr>
				<c:if test="${inlist.status==0}">
			    <td ><a href="informdetail?id=${inlist.id }">未读</a></td>
				</c:if>
				<c:if test="${inlist.status==1}">
			    <td ><a href="informdetail?id=${inlist.id }">已读</a></td>
				</c:if>
				
				<td ><a href="informdetail?id=${inlist.id }">${inlist.inform.content }</a></td>
				
				<td><a href="informdetail?id=${inlist.id }"><fmt:formatDate value="${inlist.inform.dateTime }" pattern="yyyy-MM-dd hh:mm:ss"/></a></td>
				<td><a href="delinform?id=${inlist.id }">删除</a></td>
			</tr>
			</c:forEach>
		</table>
			
			<div class="page">
			
    				<c:if test="${totalPages>0}">
						<c:if test="${page>1}">
							<a href="?page=${page-1}">上一页</a>
						</c:if>
						<c:if test="${page<=1}">
							<a>上一页</a>
						</c:if>
						<c:if test="${page<totalPages}">
							<a href="?page=${page+1}">下一页</a>
						</c:if>
						<c:if test="${page>=totalPages}">
							<a>下一页</a>
						</c:if>
	                    	<a href="#">第 ${page} 页，共 ${totalPages} 页</a>
	               </c:if>	
	               </div>
		</div>
		</div>
</body>
</html>